<?php

function prt_menu($data) {
    $i = 0;
    while ($i < count($data)) {
        echo '<li><a href="' . (strpos($data[$i]['tag'], 'http') !== false ? $data[$i]['tag'] : (URL . $data[$i]['tag'])) . '">' . mb_strtoupper($data[$i]['title'], 'utf8') . '</a></li>';
        $i++;
    }
}

function send_mail($mail,$content) {
    $to = $_POST['email'] . ', ' . 'trungtien1993@gmail.com';
    $subject = "Thiết kế web sáng tạo";

    $message = "
            <html>
            <head>
            <title>HTML email</title>
            </head>
            <body>
            <p>Đặt hàng thành công</p>
            
            </body>
            </html>
            ";

// Always set content-type when sending HTML email
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
    $headers .= 'From: <webmaster@example.com>' . "\r\n";
    $headers .= 'Cc: myboss@example.com' . "\r\n";

    mail($to, $subject, $message, $headers);
}
